<div id="view-content">
<!-- Colour Tabbed Block (Full Width) -->
		<div class="block block-colour">
			
			<!-- Block Header -->
			<div class="head">
				<div class="cap-left"></div>
				<div class="cap-right"></div>
				<div class="content">
				
					<!-- Block Title -->
					<h2><?php echo $this->translate->_('Install agent from package'); ?></h2>
					<!-- /Block Title -->
					
					<!-- Block Action Buttons -->
					<ul class="action-buttons">
						<li><a href="<?php echo $this->url(array('controller' => 'agents', 'action' => 'index'), "default", true) ?>" title="<?php echo $this->translate->_('<< back to agents'); ?>" class="button button-grey"><?php echo $this->translate->_('<< back to agents'); ?></a></li>
					</ul>
					<!-- /Block Action Buttons -->
					
					<!-- Tabs JS -->
					<script type="text/javascript">
					$(function(){
						$('#tabs-two').sTabs();
					});
					</script>
					<!-- /Tabs JS -->
					
					<!-- Block Tabs Menu -->
					<ul class="block-tab-menu" id="tabs-two">
						<li><a href="#tab-list" title=""><?php echo $this->translate->_('List'); ?></a></li>
						<li><a href="#tab-help" title=""><?php echo $this->translate->_('Help'); ?></a></li>
					</ul>
					<!-- /Block Tabs Menu -->
					
				</div>
				<div class="clear-both"></div>
			</div>
			<!-- /Block Header -->
			
			<!-- Block Content -->
			<div class="block-content">
				
				<!-- Tab One -->
				<div id="tab-list">
                            
                                    	<!-- Standard Content -->
					<div class="standard-content">
						<h3><?php echo $this->translate->_('Devices are not defined'); ?></h3>
                                                <p>installing form</p>
                                        </div>
                                         
				</div>
				<!-- /Tab One -->
				
				<!-- Tab Two -->
				<div id="tab-help" style="display: none">

					<!-- Standard Content -->
					<div class="standard-content">
						<h3>Tab Two Content Title</h3>
						<p>
							Lorem ipsum dolor sit amet, consectetur adipisicing elit, <a href="" title="">sed do eiusmod tempor</a> incididunt ut labore et dolore magna aliqua. 
							Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure 
							dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 
							proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
						</p>
						<ul>
							<li>This is a long bullet point right here</li>
							<li>Bit of a shorter one now</li>
							<li>Then for a bit of a longer one again</li>
						</ul>
						<p>
							Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
							Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure 
							dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
						</p>
					</div>
					<!-- /Standard Content -->

				</div>
				<!-- /Tab Two -->
								
			</div>
			<!-- /Block Content -->
			
			<!-- Block Footer Cap -->
			<div class="block-footer-cap">
				<div class="cap-left"></div>
				<div class="cap-right"></div>
				<div class="content"></div>
			</div>
			<!-- /Block Footer Cap -->
			
		</div>
		<!-- /Colour Tabbed Block (Full Width) -->
                
<!-- Colour Tabbed Block (Full Width) -->
		<div class="block block-colour">
			
			<!-- Block Header -->
			<div class="head">
				<div class="cap-left"></div>
				<div class="cap-right"></div>
				<div class="content">
				
					<!-- Block Title -->
					<h2><?php echo $this->translate->_('Install agent from local repository'); ?></h2>
					<!-- /Block Title -->
					
					<!-- Block Action Buttons -->
					<ul class="action-buttons">
						<li><a href="<?php echo $this->url(array('controller' => 'agents', 'action' => 'index'), "default", true) ?>" title="<?php echo $this->translate->_('<< back to agents'); ?>" class="button button-grey"><?php echo $this->translate->_('<< back to agents'); ?></a></li>
					</ul>
					<!-- /Block Action Buttons -->
					
				</div>
				<div class="clear-both"></div>
			</div>
			<!-- /Block Header -->
			
			<!-- Block Content -->
			<div class="block-content">
				
				<!-- Tab One -->
				<div id="tab-list">
                               
                                        <form action="/devices/actions" method="post">
					<!-- Standard Table -->
					<table cellpadding="0" cellspacing="0" border="0" class="standard-table" id="sortable" summary="<?php echo $this->translate->_('List of agents'); ?>">
					  <caption><?php echo $this->translate->_('List of agents'); ?></caption>
						<thead>
							<tr>
								<th style="width: 25px" class="checkbox-cell"><input type="checkbox" name="check_all" value="1" id="check-all-table-two" /></th>
								<th style="width: 150px"><?php echo $this->translate->_('Name'); ?></th> 
								<th style="width: 365px" class="center-cell"><?php echo $this->translate->_('Description'); ?></strong></th>                                                                
								<th style="width: 140px" class="status-cell"><?php echo $this->translate->_('Developer'); ?></th>                                                                
								<th style="width: 80px" class="timestamp-cell"><?php echo $this->translate->_('Installed'); ?></th>
								<th style="width: 80px" class="status-cell"><?php echo $this->translate->_('Status'); ?></th>
							</tr>
						</thead>
						<tbody>
<?php
$counter = 0;
if($this->packageObjArray) {
    foreach($this->packageObjArray as $packageObj) {
        if ($packageObj instanceof Application_Model_Package) {
            $counter++;
            $package = $packageObj->convertToArray();
?>
							<tr>
								<td style="width: 25px" class="checkbox-cell"><input type="checkbox" name="deviceid[]" value="<?php echo $package['id'] ?>" class="object-checkbox" /></td>
								<td style="width: 150px"><a href="" title=""><?php echo $package['name'] ?></a></td>
								<td style="width: 365px"><img src="/images/package_ico_dev.png" style="float:left;margin:0 5px 0 0;"/><?php echo $package['description'] ?><br/><i><a href="<?php echo $package['descriptionURL'] ?>" title="">link</a></i></td>
                                                                <td style="width: 140px" class="center-cell"><a href="<?php echo $package['developerURL'] ?>" title="Developer's website"><?php echo $package['developer'] ?></a><br/><?php echo "version: " . $package['version']; ?></td>
								<td style="width: 80px" class="center-cell"><?php echo $this->datetime($package['installed']); ?></td>  
								<td style="width: 80px" class="action-device-cell center-cell">                                                                  
                                                                        <?php #echo $this->showiconsforagents("static", $device->getAttributes()->getStatic(), $device->getFixedstatic(),"device"); ?>
                                                                        <?php #echo $this->showiconsforagents("active", $device->getAttributes()->getActive(),null,"device"); ?>
                                                                        <?php #echo $this->showiconsforagents("new", "0.33", "0.45", "package"); ?>
									<a href="" title="New version!"><img src="/images/icons/new.png" width="16" height="16" /></a>
								</td>
							</tr>
<?php
    if($packageObj->hasHubs()) {
?>  
							<tr>
								<td style="width: 25px" class="checkbox-cell"></td>
                                                                <td style="width: 150px"></td>
								<td style="width: 665px; padding: 0;" class="center-cell" colspan="4">
                                            <table cellpadding="0" cellspacing="0" border="0" class="standard-table" id="sortable" summary="<?php echo $this->translate->_('List of agents'); ?>">
						<thead>
							<tr>
								<th class="center-cell"><?php echo $this->translate->_('Name'); ?></th> 
                                                                <th class="timestamp-cell"><?php echo $this->translate->_('Type'); ?></th>                                                                
								<th class="center-cell"><?php echo $this->translate->_('Description'); ?></strong></th>                                                                
								<th class="status-cell"><?php echo $this->translate->_('Addons'); ?></th>                                                                
							</tr>
						</thead>
						<tbody>
<?php
#var_dump($packageObj->getHubs());
    foreach($packageObj->getHubs() as $hub) {
?>
 							<tr>
								<td><a href="" title=""><?php echo $hub['name'] ?></a></td>
								<td class="block-cell block-cell-grey-<?php echo $hub['type'] ?>"><?php echo $hub['type'] ?></td>
								<td class="center-cell"><?php echo $hub['description'] ?></td>                                                                
                                                                <td class="center-cell"><?php echo $hub['fixeddevices'] ?></td>  
							</tr>
<?php
        }
?>                                                     
 						</tbody>
					</table>
                                                         </td>
							</tr>                                                        
<?php
    }
        }
    }
}
?>                                                    
						</tbody>
					</table>
					<!-- /Standard Table -->
							
					<!-- Action Set & Pagination -->

					<div class="action-set-pagination">
						<div class="left">
                                                    <select name="doaction">
<?php
echo $this->actionsdropdownitems("packages");
?>
                                                    </select>
							<button type="submit" class="form-button-colour">Perform</button>
						</div>
						<div class="clear-both"></div>
					</div>

					<!-- /Action Set & Pagination -->
                                        </form>
                                        
				</div>
				<!-- /Tab One -->
				
			</div>
			<!-- /Block Content -->
			
			<!-- Block Footer Cap -->
			<div class="block-footer-cap">
				<div class="cap-left"></div>
				<div class="cap-right"></div>
				<div class="content"></div>
			</div>
			<!-- /Block Footer Cap -->
			
		</div>
		<!-- /Colour Tabbed Block (Full Width) -->
                
</div>